/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package by.vdl.websort.server.dao;

import by.vdl.websort.server.entity.CategoryDTO;
import by.vdl.websort.server.entity.ItemDTO;
import by.vdl.websort.server.entity.SortedTableDTO;
import by.vdl.websort.server.entity.StudyDTO;
import by.vdl.websort.server.entity.contextmodels.StudyUnsortedModel;

import java.util.List;

/**
 *
 * @author zeor
 */
public interface StudyDao {
    
    public long addStudy(String study, long userId) throws Exception;

    public long addCategory(String category, long studyId) throws Exception;

    public long addItem(String item, long categoryId) throws Exception;

    public StudyDTO getStudyByUserPassedId(long userPassedId) throws Exception;

    public StudyDTO getStudyById(long studyId) throws Exception;

    public CategoryDTO getCategoryById(long categoryId) throws Exception;

    public ItemDTO getItemById(long itemId) throws Exception;

    public StudyUnsortedModel getUncompletedStudy(long studyId) throws Exception;

    public List<SortedTableDTO> getSortedTablesByPassedUser(long userPassedStudyId) throws Exception;

    public SortedTableDTO addSortedTable(long categoryId, long itemId, long userPassedStudyId) throws Exception;

    public List<StudyDTO> listStudy() throws Exception;

    public List<SortedTableDTO> getUnsortedDataSubmission(long studyId) throws Exception;

}
